Test modules

Test modulesΒΆ

Loading BokehJS ...
Loading BokehJS ...
import ipyvolume.datasets
stream = ipyvolume.datasets.animated_stream.fetch()
# print("shape of steam data", stream.data.shape) # first dimension contains x, y, z, vx, vy, vz, then time, then particle

fig = ipv.figure()
# instead of doing x=stream.data[0], y=stream.data[1], ... vz=stream.data[5], use *stream.data
# limit to 50 timesteps to avoid having a huge notebook
q = ipv.quiver(*stream.data[:,0:50,:200], color="red", size=7)
ipv.style.use("dark") # looks better
ipv.animation_control(q, interval=200)
ipv.show()
Downloading https://github.com/maartenbreddels/ipyvolume/raw/master/datasets/stream-animation.npy.bz2 to /home/runner/.ipyvolume/datasets/stream-animation.npy.bz2
--2022-01-13 12:34:58--  https://github.com/maartenbreddels/ipyvolume/raw/master/datasets/stream-animation.npy.bz2
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 
302 Found
Location: https://raw.githubusercontent.com/maartenbreddels/ipyvolume/master/datasets/stream-animation.npy.bz2 [following]
--2022-01-13 12:34:59--  https://raw.githubusercontent.com/maartenbreddels/ipyvolume/master/datasets/stream-animation.npy.bz2
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.111.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 
200 OK
Length: 7963751 (7.6M) [application/octet-stream]
Saving to: β€˜/home/runner/.ipyvolume/datasets/stream-animation.npy.bz2’


stream-animation.np   0%[                    ]       0  --.-KB/s               
stream-animation.np 100%[===================>]   7.59M  --.-KB/s    in 0.08s   

2022-01-13 12:34:59 (99.9 MB/s) - β€˜/home/runner/.ipyvolume/datasets/stream-animation.npy.bz2’ saved [7963751/7963751]